﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style>
    body{font-family:tahoma;font-size:11px;margin:0; padding:0}ul,li {padding:0; margin:0}
    p{ font-size:15px; font-weight:bold}</style>
	<link href="../qschart/mstar_qs_chart_1.1.css"  type="text/css" rel="stylesheet"/>
    <script> var isDebug = false</script>
     <script src="../lib/jquery.js" type="text/javascript"></script>
    <script src="../lib/jquery.json.min.js" type="text/javascript"></script>
    <script src="../lib/migratory-jslib.js" type="text/javascript"></script>
     <!--[if IE]><script type="text/javascript" src="../lib/excanvas.min.js"></script><![endif]-->
    <script src="../js/sys/mstar.common.js" type="text/javascript"></script>
    <script src="../js/sys/DFmt.us.js" type="text/javascript"></script>
    <script src="../qschart/mstar_qs_chart_1.1.js" type="text/javascript"></script>
    <script>
    var reloginUrl = "../demologin.jsp?r=configchartdemo.htm";    // when session expired or can't login redirect this page.
    //var intradayUrl  = "http://rtqdev.morningstar.com/opt/quote.jsp?"; // get intrayData Url.
    if (Cookies.get("SessionID") == null) {
        window.location.href = reloginUrl;
    }
    </script>
</head>
<body style="overflow:auto; padding:0; margin:0">
<p>remove pCtrol1 section</p>
<div id="chart1" style="position:relative"></div>
<p>remove pCtrol2 section, hide right menu.</p>
<div id="chart2" style="position:relative"></div>
<p>remove vCtrol2 section, hide volume chart.</p>
<div id="chart3" style="position:relative"></div>
<p>remove frequency, price simple move average input boxes and event sections.</p>
<div id="chart4" style="position:relative"></div>

<script>
    var debug = true;  /// it will get data api in dev server.
    var culture = "en-US";
    var region = "USA";
    var config1 = { width: 755, height: 356 };
	GB_ChartDataManager.dataUrls.intraday =   "../quote.jsp?";;
	GB_ChartDataManager.dataUrls.historical =  "../getStockHistoricalData.jsp?";
	GB_ChartDataManager.dataUrls.fundamental =  "../getFundamentalData.jsp?";
    var ch1 = new RTChartComponent("XNYS:IBM", region, culture );
    ch1.setLoginUrl(reloginUrl);
    //ch1.setIntrayDataUrl(intradayUrl);
    ch1.initUIConfig({pCtrl1:null,autoHeight:true});  // when draw new indicator chart the height of chart auto increase.
    ch1.Init("chart1", "ch1",config1);

    var config2 = { width: 565, height: 356 };
    var ch2 = new RTChartComponent("XNYS:IBM", region, culture);
    ch2.setLoginUrl(reloginUrl);
   // ch2.setIntrayDataUrl(intradayUrl);
    ch2.setCursorType(0);     // 1 crosshair ,  0 rollball 
    ch2.initUIConfig({RightMenu:false,pCtrl2:null});
    ch2.Init("chart2", "ch2", config2);

    var config3 = { width: 565, height: 356 };
    var ch3 = new RTChartComponent("XNYS:IBM", region, culture);
    ch3.setLoginUrl(reloginUrl);
   // ch3.setIntrayDataUrl(intradayUrl);
    ch3.setCursorType(0); 
    ch3.initUIConfig({vCtrl:null,Chart:{showPChart:true,showVChart:false,showLegend:true,showTimeSlider:true}});
    ch3.Init("chart3", "ch3",config3);

    var config4={width:750,height:500};
    var ch4 = new RTChartComponent("XNAS:MSFT","USA","en-USA");
    ch4.setLoginUrl(reloginUrl);
   // ch4.setIntrayDataUrl(intradayUrl);
    ch4.setCursorType(0); 
    ch4.initUIConfig({pCtrl1:{showCompair:true,showTimeRange:true,showFrequency:false,showZoom:true},
    pCtrl2:{showChartType:true,showSMV:false, showEvent:false,showIndicator:true, showCursorType:true}});
    ch4.Init("chart4","ch4",config4);
    
</script>
</body>
</html>
